

Buffer.prototype.split = function (sep) {  // 不能用箭头函数
    console.log(this,'this');
    let index = -1
    let pos = 0
    let len = sep.length
    let parts = []
    while ((index = this.indexOf(sep, pos)) != -1) { 
        parts.push(this.slice(pos, index))
        pos = index + len
    }
    parts.push(this.slice(pos))
    return parts
}

let buf1 = Buffer.from('12**34**56')
console.log(buf1.split('**'));